<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    611. Valid Triangle Number
   </h1>
   Given an array consists of non-negative integers,  your task is to count the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle.
   <p>
    <b>
     Example 1:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> [2,2,3,4]
<b>Output:</b> 3
<b>Explanation:</b>
Valid combinations are: 
2,3,4 (using the first 2)
2,3,4 (using the second 2)
2,2,3
</pre>
   <p>
    <b>
     Note:
    </b>
    <br>
   </p>
   <ol>
    <li>
     The length of the given array won't exceed 1000.
    </li>
    <li>
     The integers in the given array are in the range of [0, 1000].
    </li>
   </ol>
  </div>
  <div>
   <h1 class="question_title">
    611. 有效三角形的个数
   </h1>
   <p>
    给定一个包含非负整数的数组，你的任务是统计其中可以组成三角形三条边的三元组个数。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> [2,2,3,4]
<strong>输出:</strong> 3
<strong>解释:</strong>
有效的组合是: 
2,3,4 (使用第一个 2)
2,3,4 (使用第二个 2)
2,2,3
</pre>
   <p>
    <strong>
     注意:
    </strong>
   </p>
   <ol>
    <li>
     数组长度不超过1000。
    </li>
    <li>
     数组里整数的范围为 [0, 1000]。
    </li>
   </ol>
  </div>
 </body>
</html>